package com.ruoyi.club.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户-社团关联对象 club_user_relation
 * 
 * @author Zou
 * @date 2025-11-14
 */
public class ClubUserRelation extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 关联ID */
    private Long id;

    /** 用户ID（sys_user.id） */
    @Excel(name = "用户ID", readConverterExp = "s=ys_user.id")
    private Long userId;

    /** 社团ID */
    @Excel(name = "社团ID")
    private Long clubId;

    /** 社团内角色：0普通成员，1管理员 */
    @Excel(name = "社团内角色：0普通成员，1管理员")
    private Long clubRole;

    /** 加入时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "加入时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date joinTime;

    /** 退出时间（NULL=未退出） */
    @Excel(name = "退出时间", readConverterExp = "N=ULL=未退出")
    private Date exitTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setClubId(Long clubId) 
    {
        this.clubId = clubId;
    }

    public Long getClubId() 
    {
        return clubId;
    }

    public void setClubRole(Long clubRole) 
    {
        this.clubRole = clubRole;
    }

    public Long getClubRole() 
    {
        return clubRole;
    }

    public void setJoinTime(Date joinTime) 
    {
        this.joinTime = joinTime;
    }

    public Date getJoinTime() 
    {
        return joinTime;
    }

    public void setExitTime(Date exitTime) 
    {
        this.exitTime = exitTime;
    }

    public Date getExitTime() 
    {
        return exitTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("clubId", getClubId())
            .append("clubRole", getClubRole())
            .append("joinTime", getJoinTime())
            .append("exitTime", getExitTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
